// INCLUDES --------------------------------------------------------------------------
#include "MainFramework.h" // engine

// FUNCTIONS -------------------------------------------------------------------------
int main (int argc, const char *argv[])
{
#ifdef GLUT
  // init basics
  glutInit(&argc, (char**)argv);
  glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL);
  glutInitWindowSize(640, 480);
  glutInitWindowPosition(50,50);
#endif // GLUT

  // initialize engine
  Init();

#ifdef GLUT
  // create the window
  glutCreateWindow(argv[0]);

  // register function callbacks
  glutReshapeFunc(Window);            // event -> window reshape
  glutWindowStatusFunc(WindowStatus); // event -> window status update

  glutKeyboardFunc(Keyboard); // event -> keyboard input
  glutMouseFunc(Mouse);       // event -> mouse input

  glutIdleFunc(Compute);      // idle callback
  glutDisplayFunc(Render);    // render callback

  // enter main processing loop
  glutMainLoop();
#endif // GLUT
  
  return 0;
}
